-------------------------------------------------------------------------------------------------------------------------------------
       log:  \\asfs.asnet.ua-net.ua.edu\users$\home\joneal\My Documents\gartzke\polity4v2010.log
  log type:  text
 opened on:  25 Sep 2012, 15:10:02
Analysis do-file polity4v2010 run on 25 Sep 2012 at 15:10:02

. /*infile Polity4v2010 data, modified mydocs\nobel\polityiv: 3-24-12; checked & minor editing 9-25-12*/
. 
. 
. /*NB: codings in polity are not compatible in several cases with COW, eg, USSR is
> 364 (not 365) 1922-91 and polity does not have same years for many states, eg, Canada is
> included in Polity 1885-1919*/
. 
. 
. set mem 400m
(409600k)

. 
. 
. /*polity IV, v. 2010; accessed 3-24-12*/
. insheet using "\\\asfs.asnet.ua-net.ua.edu\users$\home\joneal\My Documents\gartzke\polityiv\p4v2010.txt
(36 vars, 16045 obs)

. 
. desc

Contains data
  obs:        16,045                          
 vars:            36                          
 size:     1,171,285 (99.7% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
cyear           long   %12.0g                 
ccode           int    %8.0g                  
scode           str3   %9s                    
country         str24  %24s                   
year            int    %8.0g                  
flag            byte   %8.0g                  
fragment        byte   %8.0g                  
democ           byte   %8.0g                  
autoc           byte   %8.0g                  
polity          byte   %8.0g                  
polity2         byte   %8.0g                  
durable         int    %8.0g                  
xrreg           byte   %8.0g                  
xrcomp          byte   %8.0g                  
xropen          byte   %8.0g                  
xconst          byte   %8.0g                  
parreg          byte   %8.0g                  
parcomp         byte   %8.0g                  
exrec           byte   %8.0g                  
exconst         byte   %8.0g                  
polcomp         byte   %8.0g                  
prior           byte   %8.0g                  
emonth          byte   %8.0g                  
eday            byte   %8.0g                  
eyear           int    %8.0g                  
eprec           byte   %8.0g                  
interim         byte   %8.0g                  
bmonth          byte   %8.0g                  
bday            byte   %8.0g                  
byear           int    %8.0g                  
bprec           byte   %8.0g                  
post            byte   %8.0g                  
change          byte   %8.0g                  
d4              byte   %8.0g                  
sf              byte   %8.0g                  
regtrans        byte   %8.0g                  
-------------------------------------------------------------------------------
Sorted by:  
     Note:  dataset has changed since last saved

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       cyear |     16045     4022007     2501332      21800    9502010
       ccode |     16045    402.0072    250.1319          2        950
       scode |         0
     country |         0
        year |     16045     1934.93     58.5854       1800       2010
-------------+--------------------------------------------------------
        flag |     16045    .0059208     .099374          0          2
    fragment |      1836    .2124183    .6929607          0          3
       democ |     16045   -.3609847    17.57038        -88         10
       autoc |     16045    .5076348    17.68761        -88         10
      polity |     16045   -4.432907    17.69862        -88         10
-------------+--------------------------------------------------------
     polity2 |     15825   -.9110269    7.011468        -10         10
     durable |     14781     21.1623    25.64456          0        201
       xrreg |     16045   -1.207105    16.99259        -88          3
      xrcomp |     16045   -2.073855     16.8235        -88          3
      xropen |     16045   -.8300405    17.12937        -88          4
-------------+--------------------------------------------------------
      xconst |     16045   -.0514179    17.38968        -88          7
      parreg |     16045   -.1988158    17.22808        -88          5
     parcomp |     16045   -1.082331    17.06812        -88          5
       exrec |     15897    .7174939    17.68036        -88          8
     exconst |     16045   -.0507946    17.38988        -88          7
-------------+--------------------------------------------------------
     polcomp |     15959     1.13754    17.83998        -88         10
       prior |      1250     -1.1496    10.05426        -10         99
      emonth |      1304    6.757669    3.348454          1         12
        eday |      1304    16.77607    9.343805          1         31
       eyear |      1304    1951.146    50.98716       1801       2011
-------------+--------------------------------------------------------
       eprec |      1303    1.817345    1.729061          1          9
     interim |      1124   -66.11121    30.72648        -88          8
      bmonth |      1169    6.600513    3.379587          1         12
        bday |      1169    13.53379    9.664089          1         31
       byear |      1169      1947.5    56.47085       1800       2010
-------------+--------------------------------------------------------
       bprec |      1169    1.758768    1.708152          0          9
        post |      1156   -1.224913    9.777416        -88         98
      change |      1999   -2.755378    46.21417        -77         99
          d4 |      1184           1           0          1          1
          sf |       234           1           0          1          1
-------------+--------------------------------------------------------
    regtrans |      1987   -3.865123    45.19077        -77         99

. 
. mvdecode democ autoc , mv(-99)

. mvdecode democ autoc , mv(-88)
       democ: 321 missing values generated
       autoc: 321 missing values generated

. mvdecode democ autoc , mv(-77)
       democ: 189 missing values generated
       autoc: 189 missing values generated

. mvdecode democ autoc , mv(-66)
       democ: 218 missing values generated
       autoc: 218 missing values generated

. 
. lab var polity2 "revised combined score, minimizes missing, Polity4v2010"

. label var democ "Polity 4v2010 democ score"

. label var autoc "Polity 4v2010 autoc score"

. 
. keep ccode year scode country polity2 democ autoc

. 
. compress

. sort ccode year

. 
. desc 

Contains data
  obs:        16,045                          
 vars:             7                          
 size:       609,710 (99.9% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
ccode           int    %8.0g                  
scode           str3   %9s                    
country         str24  %24s                   
year            int    %8.0g                  
democ           byte   %8.0g                  Polity 4v2010 democ score
autoc           byte   %8.0g                  Polity 4v2010 autoc score
polity2         byte   %8.0g                  revised combined score,
                                                minimizes missing, Polity4v2010
-------------------------------------------------------------------------------
Sorted by:  ccode  year
     Note:  dataset has changed since last saved

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       ccode |     16045    402.0072    250.1319          2        950
       scode |         0
     country |         0
        year |     16045     1934.93     58.5854       1800       2010
       democ |     15317    3.355553    3.847169          0         10
-------------+--------------------------------------------------------
       autoc |     15317    4.265457    3.511302          0         10
     polity2 |     15825   -.9110269    7.011468        -10         10

. 
. 
. /*recode to be consistent with COW; Eugene codebook, "Polity III Merging, Country Code Recoding, and Notes," p. 62ff*/
. *A-H
. replace ccode=300 if ccode==305 & year<1920
(120 real changes made)

. drop if ccode==310 & year<1920
(53 observations deleted)

. 
. *Germany
. replace ccode=260 if ccode==255 & year>1989
(21 real changes made)

. 
. *Serbia 342, Yugo 345, Croatia 344
. replace ccode=345 if ccode==342 & year<1921
(91 real changes made)

. 
. *Italy
. replace ccode=325 if ccode==324 & year<1861   /*Sardinia 324 -1861*/
(46 real changes made)

. 
. *other changes
. *Russia
. replace ccode=365 if ccode==364 & year>1921 & year<1992
(70 real changes made)

. 
. *Pakistan
. replace ccode=770 if ccode==769 & year<1972
(25 real changes made)

. 
. *VN
. replace ccode=816 if ccode==818   /*816 is drv, 817 is rvn, 818 is Viet*/
(35 real changes made)

. 
. 
. /*recode to be consistent with BR's determination*/
. replace ccode=260 if ccode==255 & year<1946
(146 real changes made)

. replace ccode=260 if ccode==255 & year>1989
(0 real changes made)

. replace ccode=315 if ccode==316 & year>1992    /*Czech*/
(18 real changes made)

. replace ccode=678 if ccode==679 & year>1990    /*Yemen*/
(20 real changes made)

. sort ccode year

. 
. /*drop duplicate cases*/
. li if ccode==ccode[_n-1] & year==year[_n-1]

       +---------------------------------------------------------------+
       | ccode   scode        country   year   democ   autoc   polity2 |
       |---------------------------------------------------------------|
 5709. |   260     GFR   Germany West   1945       .       .         . |
 5755. |   260     GFR   Germany West   1990      10       0        10 |
 7984. |   365     RUS         Russia   1922       1       2        -1 |
15306. |   816     VIE        Vietnam   1976       0       7        -7 |
       +---------------------------------------------------------------+

. drop if ccode==ccode[_n-1] & year==year[_n-1]
(4 observations deleted)

. 
. drop if year<1816 | year>2000
(2003 observations deleted)

. 
. lab data "Polity IVv2010 w/ changes from Eugene codebook, 62ff & BR, 1816-2000: in mydocs\gartzke"
note: label truncated to 80 characters

. 
. desc

Contains data
  obs:        13,985                          Polity IVv2010 w/ changes from
                                                Eugene codebook, 62ff & BR,
                                                1816-2000: in mydocs\
 vars:             7                          
 size:       531,430 (99.9% of memory free)
-------------------------------------------------------------------------------
              storage  display     value
variable name   type   format      label      variable label
-------------------------------------------------------------------------------
ccode           int    %8.0g                  
scode           str3   %9s                    
country         str24  %24s                   
year            int    %8.0g                  
democ           byte   %8.0g                  Polity 4v2010 democ score
autoc           byte   %8.0g                  Polity 4v2010 autoc score
polity2         byte   %8.0g                  revised combined score,
                                                minimizes missing, Polity4v2010
-------------------------------------------------------------------------------
Sorted by:  ccode  year
     Note:  dataset has changed since last saved

. summ

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
       ccode |     13985    393.2177    251.3029          2        950
       scode |         0
     country |         0
        year |     13985    1930.274    53.78968       1816       2000
       democ |     13358    3.170085    3.786169          0         10
-------------+--------------------------------------------------------
       autoc |     13358    4.436143    3.461605          0         10
     polity2 |     13824   -1.258464    6.897349        -10         10

. 
. save polity4v2010, replace
file polity4v2010.dta saved

. 
. 
. 
end of do-file
       log:  \\asfs.asnet.ua-net.ua.edu\users$\home\joneal\My Documents\gartzke\polity4v2010.log
  log type:  text
 closed on:  25 Sep 2012, 15:10:04
-------------------------------------------------------------------------------------------------------------------------------------
